/**
 *  @file Writer.h
 */
#ifndef _WRITER_H_
#define _WRITER_H_

#include "../common/BaseObject.h"
#include "../collections/ArrayT.h"
#include "../text/CFString.h"

namespace cppflib
{

namespace io
{

/**
 *  Base interface for writing data in a character-wise manner
 */
class _DLLAPI Writer : public BaseObject
{
protected:
   Writer() { }

public:
   virtual ~Writer() { }

   virtual void Close() = 0;
   virtual void Flush() = 0;
   virtual void Write(collections::ArrayWChar &buffer) = 0;
   virtual void Write(collections::ArrayWChar &buffer, int offset, int count) = 0;
   virtual void Write(const CFString &str) = 0;
   virtual void Write(const CFString &str, int offset, int count) = 0;
   virtual void Write(int c) = 0;
};

} // end of namespace io

} // end of namespace cppflib

#endif

